package org.dftproject.genesis.data.genealogy.impl;

import org.dftproject.genesis.data.genealogy.IEvent;
import org.dftproject.genesis.data.genealogy.IPerson;
import org.dftproject.genesis.data.genealogy.IRole;
import org.dftproject.genesis.data.impl.EntityImpl;

public class RoleImpl extends EntityImpl implements IRole {

	private String type;
	private IPerson player;
	private IEvent event;
	
	public RoleImpl(String type, IPerson player) {
		setType(type);
		setPlayer(player);
	}
	
	public RoleImpl(String type, IPerson player, IEvent event) {
		setType(type);
		setPlayer(player);
		setEvent(event);
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public IPerson getPerson() {
		return player;
	}

	public void setPlayer(IPerson player) {
		this.player = player;
	}

	public IEvent getEvent() {
		return event;
	}

	public void setEvent(IEvent event) {
		this.event = event;
	}
	
	@Override
	public String toString() {
		return "Role(type=" + type + ", person=" + player + ", event=" + event + ")";
	}

}
